package com.liang.design.user.impl;

import com.liang.design.user.User;
import com.liang.design.visitor.Visitor;

/**
 * @author lsm
 * @ClassName Student.java
 * @Description TODO
 * @createTime 2023年12月06日 19:54:00
 */
public class Student extends User {
    public Student(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    //随机给个排名
    public int ranking() {
        return (int) (Math.random() * 100);
    }
}
